<%@ page contentType="text/html;charset=GBK"%>
<%@ page import="java.io.*"%>
<%@ page import="java.util.*"%>
<%@ page import="java.net.*"%>
<%@ page import="org.json.*"%>
<%@ page import="com.gzgi.framework.*"%>
<%@ page import="com.gzgi.framework.el.*"%>
<%@ page import="com.gzgi.framework.util.*"%>
<%@ page import="com.gzgi.framework.config.*"%>
<%@ page import="com.gzgi.framework.context.*"%>
<%@ page import="com.gzgi.framework.tree.*"%>
<%@ page import="com.gzgi.framework.dataitem.*"%>
<%@ page import="com.gzgi.framework.sys.*"%>
<%@ page import="com.gzgi.framework.todo.*"%>
<%@ page import="com.gzgi.framework.sys.model.*"%>
<%@ page import="com.gzgi.workflow.jbpm.model.*"%>
<%@ page import="com.gzgi.workflow.jbpm.container.*"%>
<%@ page import="org.apache.commons.lang.*"%>
<%@ page import="org.apache.commons.httpclient.*" %>
<%@ page import="org.apache.commons.httpclient.methods.*" %>
<%@ page import="org.apache.commons.httpclient.params.*" %>
<%
    String activationCode = request.getParameter("xyz_activationCode");
	String redirectUrl = request.getParameter("redirectUrl");
    UserService userService = (UserService)ContextFactory.getBean("userService");
	SqlMapManager sqlMapManager = (SqlMapManager)ContextFactory.getBean("sqlMapManager");
    List users = userService.getAllUsers();
	if(users != null && users.size() > 0){
		Map params = new HashMap();
		Iterator iterator = users.iterator();
		while(iterator.hasNext()){
			User u = (User)iterator.next();
			params.clear();
			params.put("actorId", u.getActorId());
			List rows = sqlMapManager.getList("QUERY_TASK", params);
			if(rows != null && rows.size() > 0){
				System.out.println(u.getName()+" has "+rows.size() +" tasks.");
			} else {
				System.out.println(u.getName()+" no  tasks.");
			}
		}
	}
%>